To begin, let’s explore the function we created to run all of this statistical analysis:
mysubsetMDS <- function(x){
mysubset <- df %>%
select(starts_with(x))
meta <- metaMDS(mysubset)
MDS_df <- data.frame(MDS1=meta$points[,1],MDS2=meta$points[,2]) %>%
cbind(demo)
return(MDS_df)
}
In English, this function allows us to run the MDS according to each subset of demographic and each subset of question type that we want. Obviously, in this page, we are exploring medical conditions.
Let’s explore the science identity subset of questions first. Running our function we created and plotting it, we are left with this image of the plot:
This is great and all, but let’s run an adonis test to see if there is a significant difference in how different medical conditions responded to science identity questions:
##
## Call:
## adonis(formula = si ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0416 0.041630 1.3051 0.00419 0.242
## Residuals 310 9.8883 0.031898 0.99581
## Total 311 9.9299 1.00000
This shows that the differences in answers are not significant, according to medical conditions.
Next, let’s look into Carer Motivation:
And an Adonis test:
##
## Call:
## adonis(formula = cm ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.2004 0.200409 3.9742 0.01266 0.04 *
## Residuals 310 15.6324 0.050427 0.98734
## Total 311 15.8329 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look at that! The differences are significant for Career Motivation across presence of medical conditions.
Now, Intrinsic Motivation:
And an Adonis test:
##
## Call:
## adonis(formula = im ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.1218 0.121815 4.3455 0.01382 0.024 *
## Residuals 310 8.6901 0.028032 0.98618
## Total 311 8.8119 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Look at that! The differences are significant for Intrinsic Motivation across presence of medical conditions.
Now, Self-Determination:
And an Adonis test:
##
## Call:
## adonis(formula = sd ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0145 0.014478 0.59035 0.0019 0.472
## Residuals 310 7.6024 0.024524 0.9981
## Total 311 7.6168 1.0000
This shows that the differences in answers are not significant, according to medical conditions.
Now, Self-Efficacy:
And an Adonis test:
##
## Call:
## adonis(formula = se ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0107 0.010686 0.38996 0.00126 0.618
## Residuals 310 8.4952 0.027404 0.99874
## Total 311 8.5059 1.00000
This shows that the differences in answers are not significant, according to medical conditions.
Now, Grade Motivation:
And an Adonis test:
##
## Call:
## adonis(formula = gm ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0290 0.029046 1.3122 0.00422 0.225
## Residuals 310 6.8618 0.022135 0.99578
## Total 311 6.8909 1.00000
This shows that the differences in answers are not significant, according to medical conditions.
Now, Competency in Science:
And an Adonis test:
##
## Call:
## adonis(formula = sci_comp ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0401 0.040140 1.156 0.00372 0.292
## Residuals 310 10.7638 0.034722 0.99628
## Total 311 10.8040 1.00000
This shows that the differences in answers are not significant, according to medical conditions.
Now, Personal Community Orientation:
And an Adonis test:
##
## Call:
## adonis(formula = per_comm_orient ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0039 0.0038990 0.44102 0.00142 0.595
## Residuals 310 2.7407 0.0088409 0.99858
## Total 311 2.7446 1.00000
This shows that the differences in answers are not significant, according to medical conditions.
Now, Competency in Science:
Well crap, something is broke there. Let’s try running a different form of MDS, giving us a similar analysis in a different way. We can interpret this data similarly to how we did before:
And an Adonis test:
##
## Call:
## adonis(formula = sci_comm_orient ~ demo$med_condition)
##
## Permutation: free
## Number of permutations: 999
##
## Terms added sequentially (first to last)
##
## Df SumsOfSqs MeanSqs F.Model R2 Pr(>F)
## demo$med_condition 1 0.0174 0.017388 1.1781 0.00379 0.304
## Residuals 310 4.5756 0.014760 0.99621
## Total 311 4.5929 1.00000
This shows that the differences in answers are not significant, according to major.
Ultimately, what we can understand from all of this is that Career and Intrinsic Motivation questions are answered significantly differently between those who have medical conditions and those who don’t.
In summary, let’s take a look at the running list we are making of which questions were significant and not according to demographics: